package com.example.design.decorator.cake;

/**
 * @Description 鸡蛋装饰器
 * @ClassName EggDecorator
 * @Author Administrator
 * @Date 2020/5/13 16:42
 * @Version 1.0.0
 */
public class EggDecorator extends AbstractDecorator {
    public EggDecorator(AbstractCake abstractCake) {
        super(abstractCake);
    }

    @Override
    protected void doSomething() {
        
    }
    
    @Override
    protected String getDesc(){
        return super.getDesc() + " 加一个鸡蛋";
    }

    @Override
    protected int cost() {
        return super.cost() + 1;
    }

    public void egg() {
        System.out.println(" 增加了一个鸡蛋");
    }
}
